package com.vitalfit.service.serviceImpl;

import com.vitalfit.model.dto.NotificationDTO;
import com.vitalfit.model.entity.report.Report;
import com.vitalfit.service.ShopManagerService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

@Service
@RequiredArgsConstructor
public class ShopManagerServiceImpl implements ShopManagerService {



    @Override
    public void performMaintenance() {
        // 执行系统维护任务
        // 这里可以放置具体地维护逻辑
    }
    @Override
    public List<Report> getReports() {
        // 生成和获取报告的逻辑
        // 填充报告列表...
        return new ArrayList<>();
    }
    @Override
    public void sendNotification(Integer managerId, NotificationDTO notificationDto) {
        // 发送通知给即将到期的会员
        LocalDate now = LocalDate.now();
        LocalDate nextMonth = now.plusMonths(1);
        //List<Customer> expiringCustomers = customerRepository.findExpiringCustomers(now,nextMonth);
        // 对expiringCustomers发送通知
    }
}

